package com.demo.search.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.demo.search.service.SearchService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.Map;

@RestController
public class SearchController {

    @Reference
    private SearchService searchService;

    @RequestMapping("/searchKw")
    public Map<String, Object> searchKw(String kw, String fq) throws IOException {
        Map<String, Object> map = searchService.searchKw(kw, fq, 1,10);
        return map;
    }
}
